basic eqkdtree implementation