finish admin function