After calculating the di