added 1 to idf denominator, to avoid divide-by-zero errors