abstract the hash map implementation