add tbmr.R and update tb.R