add sync to script