Working version for nsamples/nprocs = ct