updated cgi.py