updated cgi script