changes to main and app controller