added func for P and alfaP