added functionality to update and delete items