make search example work after refactor