refactor(terminal) init