request/response refactoring