added readme.md
revised sample code

ready for release.