sampling: N should a variable