tuple<node,Long> findInLB(int[] k, node cnode) throws valid_not_checked, pval_error, make_key_error
	{
		if (cnode.lfilledB==0)
			return new tuple<node,Long>(null,(long)0);
		long dist,min,dist1,dist2,dist3;
		int in;
		node minnode,tnode;

		minnode=null;
		min=0;
		if (min<0) min+=(long)Math.pow(2,common.bkeyLength);
		in=0;
		for(int i=0;i<cnode.lfilledB-1;i++)
		{
			dist1=common.compareKeys(k,cnode.getLtableB(i).getKey());
			if (dist1>0)
				dist1-=(long)Math.pow(2,common.bkeyLength);
			
			dist2=common.compareKeys(cnode.getLtableB(i+1).getKey(),cnode.getLtableB(i).getKey());
			if (dist2>0)
				dist2-=(long)Math.pow(2,common.bkeyLength);
			
			if (dist1>dist2)
			{
				dist3=common.compareKeys(cnode.getLtableB(i+1).getKey(),k);
				if (dist3>0)
					dist3-=(long)Math.pow(2,common.bkeyLength);
				if (dist1>dist3)
				{
					min=dist1;
					minnode=cnode.getLtableB(i);
				}
				else
				{
					min=dist3;
					minnode=cnode.getLtableB(i+1);
				}
			}
		}
		return new tuple<node,Long>(minnode,min);
	}