added calculation of the reset values