removed std::invalid_argument exception