insertion sort implemented in python