switch to TVars from TMVars
switch to modify function instead