first couple examples from packt book