Added search function. fixes #5