handle correctly the linked list