Added calc_RT. Updated main. Untested.