added comments to code and updated code book.