Added a very inefficient way to detect collisions.