adding sync option to remote script