[changes of frequncy_calculator of issue 1252]
remaining changes