implement external library for log and rmd