update admin function