converted chain analysis to use goroutines.