Updated examples to match latest API changes