reworking the app example. Many new features.