added tty functions

added functions ars same weston