[IMP]hr_material:improved code.