moddified index to allow slider to center