change algorithm sorting