extract interface for vm
context can be passed the state directly