Update 2.md

- Minor editing for readability.
- changing sample code to follow conventions used in this book.