Updated the equals method