assert.h, ++i, add qsort instead of insort