code of the book called NS By Example