Second version of sampling notebook