added search functionality, not fully tested.