added search and updated the db table