added mergeArrays