improved singleLinkedList implementation.