add equals function for the sturct or array includes Hasher interface