added before fixing number_samples changes