use correct derrivative for PE