terminal mode mostly done