add some util functions to M,VM & CVM