change how priority is handled, add more fields