added pr curve function