inserted the variable arrayIntervals into the calculations of the high and low frequencies