adding getSegment to replace ArrayAccess to Path and Host components