Added list_groups function