enhance group edit code