Added Sorting and Searching code