Pseudo-Code for Collisions