refactor 4xx