implemented basic search functionality