added pid to logging, fixed some docs
now also returns likelihood