use indexing also under randomizaiton