removed unused MgFunction type