use typedef for hash and equals