move generation of  to connect.inc.php