some refactoring to make the code simpler (thanks zach@hackerschool.com for the suggestions), also added a frequency comparison to choose the most commonly used Chinese word