Bug fix

move function definition