move to MD.pm
add test