added typedefs for functions being passed in