add hash function

add hash function for three data types