convert to new class structure