add global mgd_* functions