added collision and connected to graphics