working on insertion sort and fix lot of bugs