simplify search and fetch functions