main sync