Changed invoke to operator() for consistency with std::function