declare the waitgroup's size upfront