code to make a very simple validation tree