Set Frequency logic implemented