version using an array of anonymous goroutines