Update example to use new code