modified vm_helper and db.py