added search threading