refactored and streamlined Response class