added update and search functionality