switch global variables from m_ to g_