one more change to subsample routine