merge sorted arrays