first part of the fastcgi porting to the new api