Rewrote RTC setup