added stdexcept for compilation on linux