move translate_frequency into utils