added WaitGroup