minor changes in sort and quick sort algo