improved impl of LinkedList.insert()
get rid of use of prev in linked list loops