is it worth checking for the length of `input_data_list` instead to see if it's at least `index + 1`?