changed to error codes