Could this be sorted before output?