adding HDG stuff