Added logic for the VM