trying to find bug in insert/deletion