working on error codes