add group function.