use constant for error codes