more work on generic tree