add fitclock R code