fix duble group function