correct index variable name