Got index working