fixed frequency calculation , dates_in_rage contained duplicates