clean up baseSearch, added come documentation