Modification of writevmf that uses displacements