subsampling from reference