decouple vm and core implementation