auto index working