mostly made changes to app admin script