new test for index
fixed index bug