refactored the std::string out