refactored admin class to be prototype based