Changed name of input parameter bayesianNetwork to simply network.