made p_a, p_b and p_c class parameters instead of calculating them every time again, fixed calculation of p_a according to [engelen2012] p. 32