support two segments