moving a lot on to the md package