Marge get_group_id() function and adjust