rework groups_controller and its test.