insert.cpp first pass