Fix #25; create getSegment