small cleaning; on the way to .rmd, thinking about functions