changes to the hf_occ routine