refactor process