Set Frequency function implemented