adjust the examples to reflect API changes