Made both thread-safe using ConcurrentHashMap