Right-hand side unnecessary: `d2` is reset on each iteration.