improved CGI support