mg rtc sample