add threadsafe map class