Added comparison method for insertion sort