use intermedeate logic: always sort,  kill all exceeding