better type annotation for este collection sort