insertHead function works.