Defined main_state