Adapted to new class