added the remove button function after clicked