search and reset