Updated the seach functionality