status codes refactored