added base class for error handling