progarm to merge two arrays