Added sampling to examples