create valid c functions for callbacks