Improving basic random distribution notebook