Added a new code example from book