update the code snippet in example's readme