improve sort feature