added a function to sync everthing and loading/ending screens