refactored vm heft