Started to add frequency setting function