updated example to illustrate use of expectation = TRUE