changed synch to sync and corrected syntax issues