implemented waitForTerminal