further optimization of treebank reading