add an intersection test for line segments