recomputing p