step 3 flatten
step 4 flatten
merge