add our subsample function