Improving sorting algoritms