update example using new methods