add the Python and R code to class mmds