exchange data with terminal.