refactor Request and Response