initial MD code