changes to sorting