modified linked list
added tail