This code models 
equals to and hashCode