added /dh and /dhf, code cleanup