adds gmp function for adding groups