use Closure to replace std::func