change list to ConcurrentBag to ensure thread safety