added hazard, 5-20 to task.rb
uncommented calculate frequency and new frequency and updated to prevent nil error