update example to reflect current API