Switch from WaitGroup to channels