Add calculation of pstar