added comments to code example