include new method to calculate frequency