reorganizing class structure