check lineIntersection