called the search function twice