added a short test program for IsTree()