changed std::stoi to std::atoi