improved LinkedList implementation