public boolean insert(Key k, int altId) throws InterruptedException {
		if (transId != Thread.currentThread().getId()) {
			String s = "";
			s = "";
		}
		Globals.lockManager.exclusiveLock("n" + id(), Thread.currentThread()
				.getId());

		Node alNode = null;
		if (altId != -1) {
			Globals.lockManager.sharedLock("n" + altId, Thread.currentThread()
					.getId());

			alNode = Globals.bufferManager.readNode(altId, Thread
					.currentThread().getId());
		}

		int pos = -1;
		for (int i = 0; i < current().keys().size(); i++) {
			if (current().keys().get(i).value() > k.value()) {
				pos = i;
				break;
			} else if (current().keys().get(i).value() == k.value()) {
				return false;
			}
		}

		this.isDirty = true;
		if (pos == -1) // put it last
			current().keys().add(k);
		else
			current().keys().add(pos, k);

		// if it is insertion on parent node set its child
		if (alNode != null) {
			// alNode.isDirty = true;
			if (pos == -1)
				current().children().add(current().children().size() - 1,
						alNode.id());
			else
				current().children().add(pos, alNode.id());

			alNode.unpin();
		}

		if ((float) current().keys().size() / Globals.MAXKEYS > Globals.SPLITFACTOR)
			split(id());

		current().unpin();
		return true;
	}