hur_analysis function codes