Switch replaced with segment