add sort and knap