changed 'groups' to 'index'