changes for index variable shift