work on sort and search