Added changePriority() function to priority manager