Modified file to include the function definition