add function to set priority by name