added sample size calcuation