Add deformPriorities function.