updated for cgi