took global variable out of tv.py