fixed overlabeling function definition