added support for member functions (std::mem_fun style)