Please make this function private. And what does `hmap` mean, hash map? Could you use some clearer name for the function?