public Node addWordToTree(String word, Node adjacent, int direction){
		Node currentWord = isAChild(word,adjacent,direction);
		Node x = inDistNodeList(word,adjacent.getDistance()+1,direction);

		//Found in the Sentence Tree
		if(currentWord.getLabel().equals(word)){
			//Alredy present, increment count
		}

		String currentLabel = currentWord.getLabel();
		//double currentDist = adjacent.getDistance() +1.0;

		String xLabel = x.getLabel();
		////System.out.println("currentLabel = "+currentLabel);

		// Node is absent in both Tree and Distance List
		if(currentLabel.equals("NULL") && xLabel.equals("NULL")) {
			////System.out.println("Node is absent in both Tree and Distance List ");
			currentWord = new Node(word,1.0,0.0);



			if(direction == DFSSearch.LEFT){
				// no left node,create newnode
				adjacent.getLeft().add(currentWord);
				currentWord.getRight().add(adjacent);
			}
			if(direction == DFSSearch.RIGHT) {
				//no right node,create newnode
				adjacent.getRight().add(currentWord);
				currentWord.getLeft().add(adjacent);
			}
			addToDistList(currentWord,adjacent.getDistance()+1,direction);
		}	

		if(currentLabel.equals("NULL") && (xLabel.equals(word))) {
			////System.out.println("Node is present in the Tree at the same distance but adjacent to some other node ");
			//Already present at the same distance, increment count and modify the left,right ref

			double w = x.getcount();
			currentWord.setcount(w);
			currentWord.setLabel(word);

			if(direction == DFSSearch.LEFT){
				// no left node,create newnode
				adjacent.getLeft().add(currentWord);
				currentWord.getRight().add(adjacent);
			}
			if(direction == DFSSearch.RIGHT) {
				//no right node,create newnode
				adjacent.getRight().add(currentWord);
				currentWord.getLeft().add(adjacent);
			}
		}
		double distance = adjacent.getDistance() + 1.0;
		currentWord.setDistance(distance);
		calculateWeight(currentWord);
		return currentWord;
	}