update example code in readme to commented, concise version
added documentation for example to readme