move search results check to db
move html generation to render
