rewrite hash map access