how main_runtime & runtime_context are used?