sync button functionality