sorting using insertion method