added some comments.
added a doubly linked list.