updating all examples to new api