refactor processor