calling the text transform once only for each line, before sorting