refactored hazard map converter