sort this the right way