Updated examples to reflect API change