get mds from output