implemented circleCircle and circleRect collision detection