added ability to check collision detection