Added computation of F from P