add support for tty