added output to rmd.cpp