mafunctions