public void addHiddenLayer(int nodes){
		int layer_count = layers.size();
		Node[] last = layers.get(layer_count-2),
				output = layers.get(layer_count-1);
		//Create hidden layer
		Node[] hidden = new Node[nodes+1];
		for (int i=0; i<nodes; i++)
			hidden[i] = new Node(false);
		//Bias weight
		hidden[nodes] = new Node(true);
		
		//Connect last (old last hidden layer) to the new hidden layer
		for (Node n: last){
			n.links_out.clear();
			n.weights.clear();
			for (Node h: hidden)
				n.addOutlink(h);
		}
		//Connect the new hidden layer to the output layer
		for (Node n: output){
			for (Node h: hidden)
				h.addOutlink(n);
		}
		//Add the hidden layer to layers
		layers.add(layer_count-1, hidden);
	}