Making changes to setFrequency()