delete function and admin function