made a loop for varying sample sizes