cleaned up the error codes