operator == overloaded for linkedlist