refactor Response class