add dvLdp and dvVdp functions, fix errors in both dvdp and dhdp functions