Added ability to change function after set_mem_fn