Initial record addition code