crude implementation of a circular doubly linked list