add 1st version md.c