update equal method