changed over of conditional tests in setDownsample