refact(utils): move sync function to a utils class