removed some debug output.
made sure go routines have captured the right variables.