implement the vm call logic