first version of eiSearch.R. still testing