refactor so the app now extends express