test for index working