working prototype with search