using this compute_p finally