fix equals method