JH: Sync function first added
JH: synctask function intial added