still need to write write_unit.rmd()