explain how to convert a function to one with a different signature, for callbacks