refactoring check response