split cgi into separate file; tests for cgi