improved admin script