public int shortestPath(int startIndex, int endIndex) {
		if (startIndex < 0 || startIndex >= adjancencyList.length 
				|| endIndex < 0 || endIndex >= adjancencyList.length) {
			System.err.println("satrtIndex and endIndex has to be in range: 0 ~ " + adjancencyList.length);
			return -1;
		}
			
		if (startIndex == endIndex)
			return 0;
		
		BFSNode firstNode = nodes.get(startIndex);
		nodesToBeExamined.add(firstNode);
		while (nodesToBeExamined.size() > 0) {
			BFSNode currentNode = nodesToBeExamined.get(0);
			int currentId = currentNode.id;
			currentNode.color = BFSNodeColor.BLACK;
			
			ArrayList<Integer> currentAdjancency = adjancencyList[currentId];
			for (Integer adjancencyId : currentAdjancency) {
				BFSNode adjancencyNode = nodes.get(adjancencyId);
				
				if (adjancencyId == endIndex) {
					adjancencyNode.depth = currentNode.depth + 1;
					
					return currentNode.depth + 1;
				}
				else if (adjancencyNode.color == BFSNodeColor.WHITE) {
					adjancencyNode.color = BFSNodeColor.GREY;
					adjancencyNode.depth = currentNode.depth + 1;
					nodesToBeExamined.add(adjancencyNode);
				}
			}
			
			nodesToBeExamined.remove(currentNode);
		}
		
		// cannot find path
		return -1;
	}