sub array merge