Updated example to reflect current API