update example to work with latest code