improved admin script.