merge dp modified code into offcial 0.56 version