new iteration, sorting by weight