Add sorting to the stats