sort the items before displaying them