small improvement on sampling