proper sanitization using hashCode + equals