refactor crop workflow