add sorting to outs