separated FreqDist request into functions with parameters