update generate random indexing