changed to local Dp calculation