calculating frequencies for filters