adding up to P