actually working sync.sh