refactor responses