use std::function instead of boost::function