insertion sort with main function