changed getGroups route to sort by priorityID