transform response of search to a better format