sort and define