Optimize Frequency and update Test for frequency