change std::string to const std::string & in some methods.