improve sort