add a doDecimate option to resample()