Add support for segments.