further work on example implementation
Fix errors and omissions found in code review
minor edits