extracted method and added to HazardCalculation
pep8 fixes, added missing docstrings