separating creating the priority from populating the table