modified sync script