a versatile implementation of hashtable