adding error codes