Added collision detection

Boxes are not displaying in the proper number.