added implementations in pd, completed for wg, initial for hg