add admin function and update some models