collisions using priopity queue