implemented and corrected equals & hashCode