added method for merging darrays