Using variable for index location