pid compiles, doubt it is right