Adding in GetSegments functionality