updated sorting algos