merge as we go, to hopefully save memory