add function for TerminalController ..