implement downsampling