implement sync command