added --sync option
sync option included