updating the index from sample2