Working examples from packt's book