c++11 std::function instead of function pointer