added head word finder for tree binarization