adding subsampler class