refactor process request