refactored groups CRUD