remove MASS and mvtnorm imports, and roll own functions for better maintenance