modify group function