update example with new api for message