updated code to restore search.