implement RTC codes