fix function definition