started search function