refactor request