minor edits of example code