freq changing code