adding pty- and input- handler