added logp_2