add the optimal sort