added function remove for the delete button.