handles the case of sampling=1 more intelligently