Added search function

Closes #1