fix brainnetwork example.
variable scoping.