refactored, added vmware support