code refactoring; added one test for Response class