add rule for doubled linked list