revision.. (did it while ago..)
fixes + adding vmm -- note: the code requires more testing.