Added check if MASS package is installed