step4: finding d is working properly