why iteration should be used in final stage

plus, why not collapse the sorting in that final iteration too.