Re-implement `segment()`