modify according to comments, use ConcurrentHashMap to replace HashMap