transfer algorithm