Putting function definition before function call