added search function. Untested...