split and merge 'piles' of items