replaced std::exception with std::runtime_error