Improve barrelSorting