greedy merge pick refactoring