checking global vars in nm and am
merged NM and AM routines into a single load and setting of flag script called simultaneous.m