rename some pFoo -> varFoo to match original python code