fixing compile error due to duplicate function definition