adding common script for CGI