updating parsetree