Implemented equals() and toString() methods