Added group merging