overload for arraysegment