Use secondary key for sorting instead of 2 sorts