added some methods to class VirtualMachine