working VM
Bug fixes