migrate divide-and-conquer