add small refactoring of response class