Tweaking with sample size and average function.