code refactor, test Chinese characters