public double messageNode2Factor(int factor, int node, int value) {
		double result = 1.0;
		
		result *= messageFactor2Node(node, node, value);
		if (factor == potentials.chainLength() + node && factor > potentials.chainLength() + 1) {
			// right factor  f' -> n -> f && this is not the second node
			result *= messageFactor2Node(factor-1, node, value);
		}
		else if (factor == potentials.chainLength() + node -1 && factor <= 2 * potentials.chainLength() - 2) {
			// left factor f <- n <- f'
			result *= messageFactor2Node(factor+1, node, value);
		}
		else {
			// they are not connected
			return result;
		}
		return result;
	}