added Segment class and SweepLine class methods initially