added _gen_pri_idx so priorities are dynamically created