added FunctionWrapper for member and non member functions