added include of stdexcept