changed to the wait group from the synd library