Add sorting to results