modified main and app to integrate SPA