server side of search working