d2h method developed - still need debuging