Finished implementing insert-D.