implemented searching. Closes #1