modified the entire mdwp module