updated MDM homework2