included <stdexcept> where necessary