md preprocessing