Added support for evenly distributed samples.