Added a different algorithm for finding collisions.