minor edits and example 6