LPS-47716 Sort

Looks good to me, although I haven't had a chance to test it