add buffer-move function