change WeakMap to ordinary dictionary object