I tried implement "dynamic" quering of user defined tree. I know it is

  I tried implement "dynamic" quering of user defined tree. I know it is, ugly but I want to try if it is possible.