update
now using double linked list