refactored error numbers