added comments in findTermFrequencies
added comments in findHappiestState