adapted to core cleanup