refactored request and response classes