optimize find_mass in track