implemented waitgroup to wait for all websocket goroutines before shuting down