testing example
moved beam search; fixed lot_iter
fixed problem with updating FunctionNode function after changing the tree