http://stackoverflow.com/questions/19400349/how-to-pass-structure-to-function-in-c