fixing recurring calculation