new method for joining arrays