separated stats and pdf functions