move function pointer in class