modify linkedlist equals method