added StatsBase to REQUIRE but mad function is not the correct one to justify this require