simple C++ style hash table