added test for linesegment