merging. Implemented Merging of groups.