added sample search functionality TODO: refine