refactored Request class