Update groups() method