heap merge