reorganize parse tree slightly