use array_merge to merge groups