replaced += with array_merge