Updated examples to new API