added sstream for input methods