HDDM processing code