added support for merge_segs