Modified sort algorithm to show a process