added basic search functionality, needs refactoring / efficiency improvements