Optimize sorting time by 900% !!!!!!!!!!!!