move groups type to common code