added search and edit method