fixed api search + changed the call of search, nicer this way