move sync to util