changed things such that index_sampling can easier be run on subgroups of participants