handleUpdateIndex implemented based on ranges of missing values