insert/s and append workng, fixed memory leak.