Sort improvment