fix/improve vm