support sample size as third argument