added segment class, needs collision test