filled in alot of the vmfuncs