sort  list by priority