refactoring responses