refactored sync to button in UI