remove global var g_mass
May work