first draft hf_vm_write