working on sort and search