lambda in startNetwork() should capture by copy because arguments can go out of scope before the lambda is called