finsihed implementing the equals method