adding pri q impl and test