changed external process call from x() to subprocess.call() due to problems with the terminal output from x()