move statments about pid out of web