add hashCode method for Version