app now properly starts and stops