add specializations for int, double, and char in hash function