need to work on sum(d0,d1)