remodularized, started sync.py