Do the sorting inline