main system controller