rewrite find_mass function in track module