Updating the calcDPS function and some classes