support for pr curves, minor changes to API