stopped using private method for error handling