Implemented a very naive search function.