modify the equals method