[IMP]hr_material: imporved the code.