equals method fixed