considered making frequency based on string rather than double