overhaul the parinfer code