Could you rename ```d``` and ```n``` by using more meaningful names?