Updated the script such that it allows users to modify the index where
the data is stored