divided two program, terminal and GUI