added hashCode method to model classes