added method to calculate the month distribution