improve layering of rmd functions