Added xterm function