use std::string instead of cstring