same refactor for create_group REST API