init cgi main