added comments to example, neatned up