Update the examples to the updated api