outline algorithm
merge