functional qvec sample() and pML_rec() ..