Got sort working