restructure the app