refactor request class