concordance code using double linked list