updates exampleapp.js to new callback pattern