added enum gui_state;