removed redundant code from admin.js