abstracted RTC check into a function