refactored groups controllers