code from the myFirstApp example