Changed << to += for concatenating arrays.