restructure of app