Updated examples to use new API