Linked list: modify insert to work in constant time