modify: test for index