#2 corrected equals method