first version of search