updated MG_Tools