Fixing writing code example
Merge pull request #17 from Spantree/master

fixing code example for writing