Added downsampling if we need it