Add priority to search function

Resolves #104