make frequncy a variable