Sorting output by TCO