Add sync function.