public void add(KDLeafNode<T> node) 
        {
            if ( isLeftOfSplitAxis( node ) )
            {

                if ( leftChild == null ) 
                {
                    leftChild = node;
                    return;
                } 
                
                if ( ! leftChild.isLeaf() ) {
                    leftChild.add( node );
                    return;
                } 
                
                System.out.println("LEFT");
                // replace leaf node with split one
                final KDTreeNode<T> newNode;
                if ( splitAxis == X_AXIS ) {
                    // this node is split by X-Axis , split along other (=> Y) axis
                    newNode = new KDTreeNode<T>( x1,y1,splitPoint,y2,Y_AXIS);
                } else {
                   // this node is split by Y-axis, split along other (=> X) axis
                    newNode = new KDTreeNode<T>( x1,y1,x2,splitPoint,X_AXIS);                    
                }
                System.out.println("New node: "+newNode);
                newNode.add( (KDLeafNode<T>) leftChild );
                newNode.add( node );
                leftChild = newNode;
                return;
            } 
            
            /*
             * Right half
             */
            
            if ( rightChild == null ) 
            {
                rightChild = node;
                return;
            } 
            
            if ( ! rightChild.isLeaf() ) {
                rightChild.add( node );
                return;
            } 
            
            System.out.println("RIGHT");
            
            // replace leaf node with split one
            final KDTreeNode<T> newNode;
            if ( splitAxis == X_AXIS ) {
                // this node is split by X-Axis , split along other (=> Y) axis
                newNode = new KDTreeNode<T>( splitPoint,y1,x2,y2,Y_AXIS);
            } else {
               // this node is split by Y-axis, split along other (=> X) axis
                newNode = new KDTreeNode<T>( x1,splitPoint,x2,y2,X_AXIS);                    
            }
            System.out.println("New node: "+newNode);
            newNode.add( (KDLeafNode<T>) rightChild );
            newNode.add( node );
            rightChild = newNode;            
        }