changed std::out_of_range to std::length_errror