Modified the example to accompany the new API