added admin function back to code