refactoring Request class.