updated MassFunctions.py