Fixed d(a,b), and added more explanation according to yangmungi.