main and app with plug in