improved sorting time